<?php /* Smarty version 3.1.27, created on 2015-07-01 14:13:39
         compiled from "view\1.html" */ ?>
<?php
/*%%SmartyHeaderCode:214155593d973952966_49257664%%*/
if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '3330ba0d449d1da04d5fe5acc2c32b902eee19a5' => 
    array (
      0 => 'view\\1.html',
      1 => 1435752817,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '214155593d973952966_49257664',
  'variables' => 
  array (
    'name' => 0,
    'time' => 0,
    'username' => 0,
    'stu' => 0,
    'html' => 0,
    'tjji' => 0,
    'content' => 0,
    'sname' => 0,
    'data' => 0,
    'value' => 0,
    'attr' => 0,
    'v' => 0,
    'arrt' => 0,
  ),
  'has_nocache_code' => false,
  'version' => '3.1.27',
  'unifunc' => 'content_5593d973b1a937_53436617',
),false);
/*/%%SmartyHeaderCode%%*/
if ($_valid && !is_callable('content_5593d973b1a937_53436617')) {
function content_5593d973b1a937_53436617 ($_smarty_tpl) {
if (!is_callable('smarty_modifier_date_format')) require_once 'C:\\wamp\\www\\hdc50\\fuxi\\070101\\smarty\\plugins\\modifier.date_format.php';
if (!is_callable('smarty_modifier_capitalize')) require_once 'C:\\wamp\\www\\hdc50\\fuxi\\070101\\smarty\\plugins\\modifier.capitalize.php';
if (!is_callable('smarty_modifier_regex_replace')) require_once 'C:\\wamp\\www\\hdc50\\fuxi\\070101\\smarty\\plugins\\modifier.regex_replace.php';

$_smarty_tpl->properties['nocache_hash'] = '214155593d973952966_49257664';
?>
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
<!-- 变量 -->
<?php echo $_smarty_tpl->tpl_vars['name']->value;?>
 <br>

<!-- 显示时间 格式化日期-->  
<?php echo smarty_modifier_date_format($_smarty_tpl->tpl_vars['time']->value,"%y-%m-%d %H-%M");?>
  <br>

<!-- 单一数组 -->
<?php echo $_smarty_tpl->tpl_vars['username']->value['user'];?>
 <br>

<!-- 多维数组 -->
<!-- $re = array('web'=>array('name'=>'后盾网','age'=>30));
$obj->assign('stu',$re); -->
<?php echo $_smarty_tpl->tpl_vars['stu']->value['web']['name'];?>
&nbsp&nbsp<?php echo $_smarty_tpl->tpl_vars['stu']->value['web']['age'];?>
 <br>

<!-- 直接输出 -->
<?php echo $_smarty_tpl->tpl_vars['html']->value;?>
 <br>
<!-- 首字大写 -->
<?php echo smarty_modifier_capitalize($_smarty_tpl->tpl_vars['html']->value);?>
 <br>
<!-- 将cat里的值连接到给定的变量后面 -->
<?php echo ($_smarty_tpl->tpl_vars['username']->value['user']).('baidu');?>
 <br>
<!-- 变量没有时  设置一个默认值 -->
<?php echo (($tmp = @$_smarty_tpl->tpl_vars['tjji']->value)===null||$tmp==='' ? 'www.houdunwang.com' : $tmp);?>
 <br>
<!-- 用于html转码,url转码  把里面的内容全部格式输出-->
<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['html']->value, ENT_QUOTES, 'UTF-8', true);?>
 <br>
<!-- 在每行缩进字符串，默认是4个字符   需要带代码中看效果-->
<?php echo preg_replace('!^!m',str_repeat(' ',30),$_smarty_tpl->tpl_vars['content']->value);?>
 <br>
<!-- 正则替换   第一个参数/h2/ 为替换的规则   第二个参数为替换的内容-->
<?php echo strtolower(strtoupper(smarty_modifier_regex_replace($_smarty_tpl->tpl_vars['content']->value,'/h2/','h1')));?>


<!-- 字段截取 -->
<literal>
<?php echo truncate_hd($_smarty_tpl->tpl_vars['sname']->value,5);?>

</literal>

<!-- 循环函数 -->

<?php
$_from = $_smarty_tpl->tpl_vars['data']->value;
if (!is_array($_from) && !is_object($_from)) {
settype($_from, 'array');
}
$_smarty_tpl->tpl_vars['value'] = new Smarty_Variable;
$_smarty_tpl->tpl_vars['value']->_loop = false;
$_smarty_tpl->tpl_vars['key'] = new Smarty_Variable;
foreach ($_from as $_smarty_tpl->tpl_vars['key']->value => $_smarty_tpl->tpl_vars['value']->value) {
$_smarty_tpl->tpl_vars['value']->_loop = true;
$foreach_value_Sav = $_smarty_tpl->tpl_vars['value'];
?>
	<?php echo $_smarty_tpl->tpl_vars['value']->value;?>

<?php
$_smarty_tpl->tpl_vars['value'] = $foreach_value_Sav;
}
?>
<hr>
<!-- 多维数组循环函数输出 -->
<?php
$_from = $_smarty_tpl->tpl_vars['attr']->value;
if (!is_array($_from) && !is_object($_from)) {
settype($_from, 'array');
}
$_smarty_tpl->tpl_vars['value'] = new Smarty_Variable;
$_smarty_tpl->tpl_vars['value']->_loop = false;
$_smarty_tpl->tpl_vars['key'] = new Smarty_Variable;
foreach ($_from as $_smarty_tpl->tpl_vars['key']->value => $_smarty_tpl->tpl_vars['value']->value) {
$_smarty_tpl->tpl_vars['value']->_loop = true;
$foreach_value_Sav = $_smarty_tpl->tpl_vars['value'];
?>
	
	姓名：<?php echo $_smarty_tpl->tpl_vars['value']->value['uname'];?>


<?php
$_smarty_tpl->tpl_vars['value'] = $foreach_value_Sav;
}
?>
<hr>
<!-- 多维数组的循环嵌套输出 -->
<?php
$_from = $_smarty_tpl->tpl_vars['attr']->value;
if (!is_array($_from) && !is_object($_from)) {
settype($_from, 'array');
}
$_smarty_tpl->tpl_vars['value'] = new Smarty_Variable;
$_smarty_tpl->tpl_vars['value']->_loop = false;
$_smarty_tpl->tpl_vars['key'] = new Smarty_Variable;
foreach ($_from as $_smarty_tpl->tpl_vars['key']->value => $_smarty_tpl->tpl_vars['value']->value) {
$_smarty_tpl->tpl_vars['value']->_loop = true;
$foreach_value_Sav = $_smarty_tpl->tpl_vars['value'];
?>
	<?php
$_from = $_smarty_tpl->tpl_vars['value']->value;
if (!is_array($_from) && !is_object($_from)) {
settype($_from, 'array');
}
$_smarty_tpl->tpl_vars['v'] = new Smarty_Variable;
$_smarty_tpl->tpl_vars['v']->_loop = false;
$_smarty_tpl->tpl_vars['k2'] = new Smarty_Variable;
foreach ($_from as $_smarty_tpl->tpl_vars['k2']->value => $_smarty_tpl->tpl_vars['v']->value) {
$_smarty_tpl->tpl_vars['v']->_loop = true;
$foreach_v_Sav = $_smarty_tpl->tpl_vars['v'];
?>
		<?php echo $_smarty_tpl->tpl_vars['v']->value;?>
 <br>
	<?php
$_smarty_tpl->tpl_vars['v'] = $foreach_v_Sav;
}
?>
<?php
$_smarty_tpl->tpl_vars['value'] = $foreach_value_Sav;
}
?>
<hr>

<!-- 复杂的循环输出  section -->
<?php echo $_smarty_tpl->tpl_vars['name']->value;?>
 <br>
<?php if (isset($_smarty_tpl->tpl_vars['smarty']->value['section']['n'])) unset($_smarty_tpl->tpl_vars['smarty']->value['section']['n']);
$_smarty_tpl->tpl_vars['smarty']->value['section']['n']['loop'] = is_array($_loop=$_smarty_tpl->tpl_vars['attr']->value) ? count($_loop) : max(0, (int) $_loop); unset($_loop);
$_smarty_tpl->tpl_vars['smarty']->value['section']['n']['name'] = 'n';
$_smarty_tpl->tpl_vars['smarty']->value['section']['n']['show'] = true;
$_smarty_tpl->tpl_vars['smarty']->value['section']['n']['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['n']['loop'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['n']['step'] = 1;
$_smarty_tpl->tpl_vars['smarty']->value['section']['n']['start'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['n']['step'] > 0 ? 0 : $_smarty_tpl->tpl_vars['smarty']->value['section']['n']['loop']-1;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['n']['show']) {
    $_smarty_tpl->tpl_vars['smarty']->value['section']['n']['total'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['n']['loop'];
    if ($_smarty_tpl->tpl_vars['smarty']->value['section']['n']['total'] == 0)
        $_smarty_tpl->tpl_vars['smarty']->value['section']['n']['show'] = false;
} else
    $_smarty_tpl->tpl_vars['smarty']->value['section']['n']['total'] = 0;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['n']['show']):

            for ($_smarty_tpl->tpl_vars['smarty']->value['section']['n']['index'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['n']['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']['n']['iteration'] = 1;
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['n']['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']['n']['total'];
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['n']['index'] += $_smarty_tpl->tpl_vars['smarty']->value['section']['n']['step'], $_smarty_tpl->tpl_vars['smarty']->value['section']['n']['iteration']++):
$_smarty_tpl->tpl_vars['smarty']->value['section']['n']['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['n']['iteration'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['n']['index_prev'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['n']['index'] - $_smarty_tpl->tpl_vars['smarty']->value['section']['n']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['n']['index_next'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['n']['index'] + $_smarty_tpl->tpl_vars['smarty']->value['section']['n']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['n']['first']      = ($_smarty_tpl->tpl_vars['smarty']->value['section']['n']['iteration'] == 1);
$_smarty_tpl->tpl_vars['smarty']->value['section']['n']['last']       = ($_smarty_tpl->tpl_vars['smarty']->value['section']['n']['iteration'] == $_smarty_tpl->tpl_vars['smarty']->value['section']['n']['total']);
?>
	<!-- 获取序号 -->
	<?php echo $_smarty_tpl->getVariable('smarty')->value['section']['n']['index'];?>
:
	<!-- 获取序号的范围 -->
	<?php if ($_smarty_tpl->getVariable('smarty')->value['section']['n']['index'] <= 3) {?>
	  <b style="color:red"> <?php echo $_smarty_tpl->tpl_vars['attr']->value[$_smarty_tpl->getVariable('smarty')->value['section']['n']['index']]['uname'];?>
</b>
	<?php } else { ?>
		<?php echo $_smarty_tpl->tpl_vars['attr']->value[$_smarty_tpl->getVariable('smarty')->value['section']['n']['index']]['uname'];?>

	<?php }?>
<?php endfor; endif; ?>


<?php if (isset($_smarty_tpl->tpl_vars['smarty']->value['section']['n'])) unset($_smarty_tpl->tpl_vars['smarty']->value['section']['n']);
$_smarty_tpl->tpl_vars['smarty']->value['section']['n']['loop'] = is_array($_loop=$_smarty_tpl->tpl_vars['arrt']->value) ? count($_loop) : max(0, (int) $_loop); unset($_loop);
$_smarty_tpl->tpl_vars['smarty']->value['section']['n']['name'] = 'n';
$_smarty_tpl->tpl_vars['smarty']->value['section']['n']['show'] = true;
$_smarty_tpl->tpl_vars['smarty']->value['section']['n']['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['n']['loop'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['n']['step'] = 1;
$_smarty_tpl->tpl_vars['smarty']->value['section']['n']['start'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['n']['step'] > 0 ? 0 : $_smarty_tpl->tpl_vars['smarty']->value['section']['n']['loop']-1;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['n']['show']) {
    $_smarty_tpl->tpl_vars['smarty']->value['section']['n']['total'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['n']['loop'];
    if ($_smarty_tpl->tpl_vars['smarty']->value['section']['n']['total'] == 0)
        $_smarty_tpl->tpl_vars['smarty']->value['section']['n']['show'] = false;
} else
    $_smarty_tpl->tpl_vars['smarty']->value['section']['n']['total'] = 0;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['n']['show']):

            for ($_smarty_tpl->tpl_vars['smarty']->value['section']['n']['index'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['n']['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']['n']['iteration'] = 1;
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['n']['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']['n']['total'];
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['n']['index'] += $_smarty_tpl->tpl_vars['smarty']->value['section']['n']['step'], $_smarty_tpl->tpl_vars['smarty']->value['section']['n']['iteration']++):
$_smarty_tpl->tpl_vars['smarty']->value['section']['n']['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['n']['iteration'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['n']['index_prev'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['n']['index'] - $_smarty_tpl->tpl_vars['smarty']->value['section']['n']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['n']['index_next'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['n']['index'] + $_smarty_tpl->tpl_vars['smarty']->value['section']['n']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['n']['first']      = ($_smarty_tpl->tpl_vars['smarty']->value['section']['n']['iteration'] == 1);
$_smarty_tpl->tpl_vars['smarty']->value['section']['n']['last']       = ($_smarty_tpl->tpl_vars['smarty']->value['section']['n']['iteration'] == $_smarty_tpl->tpl_vars['smarty']->value['section']['n']['total']);
?>
	<!-- 获取序号 -->
	<?php echo $_smarty_tpl->getVariable('smarty')->value['section']['n']['index'];?>
:
	<!-- 获取序号的范围 -->
	<?php if ($_smarty_tpl->getVariable('smarty')->value['section']['n']['index'] == 3) {?>
	  <b style="color:blue"> <?php echo $_smarty_tpl->tpl_vars['arrt']->value[$_smarty_tpl->getVariable('smarty')->value['section']['n']['index']]['uname'];?>
</b>
	<?php } else { ?>
		<?php echo $_smarty_tpl->tpl_vars['arrt']->value[$_smarty_tpl->getVariable('smarty')->value['section']['n']['index']]['uname'];?>

	<?php }?>
<?php endfor; endif; ?>
</body>
</html><?php }
}
?>